import request from '@/utils/request'
// 农事字典
export const getSysDictListApi = () => request.get('sys_dic/list?')
// 农事字典子类 NS农事类型 ZZZL种植种类 DKLX地块类型 RKLX入库类型 NZZL农资种类 YHJS用户角色
export const getSysSonDictListApi = (code) => request.get(`/sys_dic/getSonDictByCode?code=${code}`)

// 字典添加
export function addDic (data) {
  return request({
    url: '/sys_dic/add',
    method: 'post',
    data
  })
}

// 农资字典表
export const getAgriculturalDictApi = (data) => {
  return request({
    url: '/agricultural_dic/page',
    method: 'get',
    data
  })
}
// 播种字典表
export const getSysSeedApi = (data) => request.get(`/sys_dic_seed/page?current=${data.current}&pageSize=${data.pageSize}`)
// 添加时查询用户信息
export const getUserListApi = (baseId) => request.get(`/user_info/list?baseId=${baseId}`)
